#ifndef MYCARD_H
#define MYCARD_H

#include <QWidget>
#include <Qpainter>
#include <QPixmap>
#include <QPushButton>
#include <QTimer>
#include "card.h"

class mycard : public QWidget
{
    Q_OBJECT
public:
    explicit mycard(QWidget *parent = nullptr);
    QTimer *timer;//定时器
    int min=1;
    int max=8;
    bool isAnimation=false;

    //获取卡面
    void setImage(QPixmap &front,QPixmap &back);
    QPixmap getImage();
    void paintevent(QPaintEvent *event);

    //哪一面朝上
    void setfront(bool flag);//flag真显示正面
    bool isFrontSide();



    QPixmap m_front;
    QPixmap m_back;
    bool isfront;

    void setcard(card &card);
    card getcard();


    card m_card;


    void mousePressEvent(QMouseEvent *event);
signals:

};

#endif // MYCARD_H
